package com.ruoyi.yzd.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yzd.mapper.YzdChemicalMapper;
import com.ruoyi.yzd.domain.YzdChemical;
import com.ruoyi.yzd.service.IYzdChemicalService;

/**
 * 易制毒-化学品Service业务层处理
 * 
 * @author zyb
 * @date 2023-07-04
 */
@Service
public class YzdChemicalServiceImpl implements IYzdChemicalService 
{
    @Autowired
    private YzdChemicalMapper yzdChemicalMapper;

    /**
     * 查询易制毒-化学品
     * 
     * @param chemicalId 易制毒-化学品主键
     * @return 易制毒-化学品
     */
    @Override
    public YzdChemical selectYzdChemicalByChemicalId(Long chemicalId)
    {
        return yzdChemicalMapper.selectYzdChemicalByChemicalId(chemicalId);
    }

    /**
     * 查询易制毒-化学品列表
     * 
     * @param yzdChemical 易制毒-化学品
     * @return 易制毒-化学品
     */
    @Override
    public List<YzdChemical> selectYzdChemicalList(YzdChemical yzdChemical)
    {
        return yzdChemicalMapper.selectYzdChemicalList(yzdChemical);
    }

    /**
     * 新增易制毒-化学品
     * 
     * @param yzdChemical 易制毒-化学品
     * @return 结果
     */
    @Override
    public int insertYzdChemical(YzdChemical yzdChemical)
    {
        return yzdChemicalMapper.insertYzdChemical(yzdChemical);
    }

    /**
     * 修改易制毒-化学品
     * 
     * @param yzdChemical 易制毒-化学品
     * @return 结果
     */
    @Override
    public int updateYzdChemical(YzdChemical yzdChemical)
    {
        return yzdChemicalMapper.updateYzdChemical(yzdChemical);
    }

    /**
     * 批量删除易制毒-化学品
     * 
     * @param chemicalIds 需要删除的易制毒-化学品主键
     * @return 结果
     */
    @Override
    public int deleteYzdChemicalByChemicalIds(Long[] chemicalIds)
    {
        return yzdChemicalMapper.deleteYzdChemicalByChemicalIds(chemicalIds);
    }

    /**
     * 删除易制毒-化学品信息
     * 
     * @param chemicalId 易制毒-化学品主键
     * @return 结果
     */
    @Override
    public int deleteYzdChemicalByChemicalId(Long chemicalId)
    {
        return yzdChemicalMapper.deleteYzdChemicalByChemicalId(chemicalId);
    }
}
